package com.example.time_manager

import android.app.Activity
import android.content.Intent
import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.os.PersistableBundle
import android.os.SystemClock
import android.view.Window.FEATURE_NO_TITLE
import androidx.annotation.RequiresApi

class SplashActivity : Activity() {

    @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        window.requestFeature(FEATURE_NO_TITLE)
        window.statusBarColor = Color.TRANSPARENT;
        setContentView(R.layout.activity_splash)
        val intent = Intent()
        intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
        intent.setClass(this, MainActivity::class.java)
        // 子线程休眠
        Thread(Runnable {
            // 延时秒数
            SystemClock.sleep(1500)
            startActivity(intent)
        }).start()
    }


}